import { stores } from '@/stores/index.js'
import { color } from 'echarts'
const themeStore = stores.useThemeStore()

export default {
  type: 'gauge',
  option: {
    series: [
      {
        type: 'gauge',
        center: ['50%', '60%'],
        // radius: '20%',
        startAngle: 200,
        endAngle: -20,
        min: 0,
        max: 60,
        splitNumber: 12,
        itemStyle: {
          color: '#C2C2C2'
        },
        progress: {
          show: true,
          width: 15
        },
        pointer: {
          show: false
        },
        axisLine: {
          lineStyle: {
            width: 15,
            color: '#6798B8',
            color: [[1, '#6798B8']]
          }
        },
        axisTick: {
          distance: -25,
          splitNumber: 3,
          lineStyle: {
            width: 0.2,
            color: '#999'
          }
        },
        splitLine: {
          distance: -32,
          length: 6,
          lineStyle: {
            width: 0.5,
            color: '#999'
          }
        },
        axisLabel: {
          show: false,
          distance: -20,
          color: '#999',
          fontSize: 12
        },
        anchor: {
          show: false
        },
        title: {
          show: false
        },
        detail: {
          valueAnimation: true,
          width: '60%',
          lineHeight: 20,
          borderRadius: 8,
          offsetCenter: [0, '-15%'],
          fontSize: 12,
          fontWeight: 'bolder',
          formatter: function (value) {
            return value + '\n' + '监室人数'
          },
          color: '#2F4050'
        },
        data: [
          {
            value: 20
          }
        ]
      }
    ]
  }
}
